using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using UwinEducation.Application.Dtos.Orders;
using UwinEducation.Shared.Enums;
using UwinEducation.Shared.Models;

namespace UwinEducation.Application.Common.Interfaces.Orders
{
    /// <summary>
    /// 订单支付服务接口
    /// </summary>
    public interface IOrderPaymentService
    {
        /// <summary>
        /// 根据ID获取订单支付详情
        /// </summary>
        /// <param name="id">支付ID</param>
        /// <returns>订单支付DTO</returns>
        Task<OrderPaymentDto> GetByIdAsync(Guid id);

        /// <summary>
        /// 根据订单ID获取支付记录列表
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <returns>订单支付DTO列表</returns>
        Task<List<OrderPaymentDto>> GetByOrderIdAsync(Guid orderId);

        /// <summary>
        /// 获取订单支付分页列表
        /// </summary>
        /// <param name="request">分页请求DTO</param>
        /// <returns>分页结果</returns>
        Task<PagedResult<OrderPaymentDto>> GetPagedListAsync(OrderPaymentPageRequestDto request);

        /// <summary>
        /// 创建订单支付记录
        /// </summary>
        /// <param name="createDto">创建订单支付DTO</param>
        /// <returns>创建后的订单支付DTO</returns>
        Task<OrderPaymentDto> CreateAsync(CreateOrderPaymentDto createDto);

        /// <summary>
        /// 更新订单支付记录
        /// </summary>
        /// <param name="updateDto">更新订单支付DTO</param>
        /// <returns>更新后的订单支付DTO</returns>
        Task<OrderPaymentDto> UpdateAsync(UpdateOrderPaymentDto updateDto);



        /// <summary>
        /// 删除订单支付记录
        /// </summary>
        /// <param name="id">支付ID</param>
        Task DeleteAsync(Guid id);

        /// <summary>
        /// 计算订单的总支付金额
        /// </summary>
        /// <param name="orderId">订单ID</param>
        /// <returns>总支付金额</returns>
        Task<decimal> GetTotalPaidAmountAsync(Guid orderId);
    }
} 